import React from 'react'
import { Link } from 'react-router-dom';
import { $pre } from "../../../../http/http";
import "./Groupon.less"

export default function Groupon(props) {
    let { groupon } = props;

    return (
        <div className='newbie2'>
            <h1>万人团</h1>
            <ul>
                {
                    groupon.map((item) => {
                        return (
                            <Link to={`/goods/${item.id}/2`} className="card" key={item.id}>
                            <li key={item.id}
                        >
                            <div className='se'>
                                <img src={$pre + item.img} alt={item.goodsname} />
                                <div>
                                    <h2>商品名称：{item.goodsname}</h2>
                                    <p>原价：{item.market_price}</p>
                                    <p>现价：{item.price}</p>
                                    
                                </div>
                            </div>
                        </li>
                         </Link>
                        )
                    })
                }

            </ul>
        </div>
    )
}

